home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Applications 1999 November / SGI IRIX 6.5 Applications 1999 November.iso / relnotes / nedit / nedit.doc < prev    next >
Text File  |  1999-10-15  |  88KB  |  1,940 lines

  1.                                  NEDIT 4.0.3
  2.  
  3. NEdit is a GUI (Graphical User Interface) style text editor for programs and
  4. plain-text files.  Users of Macintosh and MS Windows based text editors will
  5. find NEdit a familiar and comfortable environment.  NEdit provides all of the
  6. standard menu, dialog, editing, and mouse support, as well as all of the
  7. standard shortcuts to which the users of modern GUI based environments are
  8. accustomed.  For users of older style Unix editors, welcome to the world of
  9. mouse-based editing!
  10.  
  11. NEdit is free, available in source and binary form for Silicon Graphics, HP,
  12. DEC, IBM, Sun, and Linux systems, as well as for VAX and Alpha VMS. Executables
  13. for non-supported systems are also available.  Porting to other Motif platforms
  14. has generally been easy.
  15.  
  16.  
  17. INSTALLING NEDIT
  18.  
  19. NEdit is a single stand-alone executable file which can be installed by simply
  20. copying the appropriate executable "nedit" for your system.  Both sources
  21. and executables are available via anonymous ftp to ftp.fnal.gov in the
  22. /pub/nedit directory.  The optional "nc" (NEdit Client) program is also
  23. available for users who want to run nedit in client/server mode.
  24.  
  25.  
  26. GETTING STARTED
  27.  
  28. If you are new to X windows, you may need some help setting up your X
  29. environment or using X across a network.  If you have used other Motif
  30. programs before, you can probably use NEdit without much instruction.
  31.  
  32. Start NEdit by typing nedit.  You can specify a file or several files to edit
  33. on the command line, but you can also open them from inside NEdit.  If you
  34. don't specify a file name to edit, NEdit will open a window titled "Untitled".
  35. You can create a new file by typing into this window and choosing Save or
  36. Save As... from the File menu.  There is no "main window" in NEdit, all
  37. editor windows are equivalent, and NEdit remains running as long as at least
  38. one window is open.
  39.  
  40. Most editor commands are available from the pulldown menus (File, Edit, Search,
  41. etc.).  If you make a mistake, any editing operation can be undone by
  42. selecting Undo from the Edit menu.  Online help is also available through the
  43. Help menu on the right-hand side of the menu bar.
  44.  
  45. To open an existing file once nedit is running, choose Open... from the File
  46. menu.   Select the file that you want to open in the pop-up dialog that
  47. appears, and click on OK.  You may have any number of files open at the same
  48. time.  Each file will appear in its own editor window.  Using Open..., rather
  49. than re-typing the nedit command and running additional copies of NEdit, is
  50. both more memory-efficient, and allows NEdit to better manage your files.
  51.  
  52. As you become more familiar with NEdit, you can use the control and function
  53. keys shown on the right side of the pull-down menus, as a substitute for
  54. selecting items with the mouse.
  55.  
  56. Dialogs are also streamlined so you can enter information quickly and without
  57. using the mouse.  Keyboard focus is automatically directed to the first field
  58. in a dialog when the dialog pops up.  To move the keyboard focus around a
  59. dialog, use the tab and arrow keys.  One of the buttons in a dialog is usually
  60. drawn with a thick, indented, outline.  This button can be activated by
  61. pressing return or enter.  For example, to replace the string "thing" with
  62. "things" type:
  63.  
  64.     <ctrl-r>thing<tab>things<return>
  65.  
  66. To open a file named "whole_earth.c", type:
  67.  
  68.     <ctrl-o>who<return>
  69.  
  70. (how much of the filename you need to type depends on the other files in the
  71. directory).  See the section titled KEYBOARD SHORTCUTS for more information.
  72.  
  73.  
  74. SELECTING, CUTTING, and PASTING
  75.  
  76. NEdit has two general types of selections, primary (highlighted text), and
  77. secondary (underlined text). Selections can cover either a simple range of text
  78. between two points in the file, or they can cover a rectangular area of the
  79. file.  Rectangular selections are only useful with non-proportional (fixed
  80. spacing) fonts.
  81.  
  82. To select text for copying, deleting, or replacing, press the left mouse button
  83. with the pointer at one end of the text you want to select, and drag it to the
  84. other end.  The text will become highlighted.  To select a whole word, double
  85. click (click twice quickly in succession).  Double clicking and then dragging
  86. the mouse will select a number of words.  Similarly, you can select a whole
  87. line or a number of lines by triple clicking or triple clicking and dragging.
  88. Quadruple clicking selects the whole file.  After releasing the mouse button,
  89. you can still adjust a selection by holding down the shift key and dragging on
  90. either end of the selection.  To delete the selected text, press delete or
  91. backspace.  To replace it, begin typing.
  92.  
  93. To select a rectangle or column of text, hold the Ctrl key while dragging the
  94. mouse.  Rectangular selections can be used in any context that normal
  95. selections can be used, including cutting and pasting, filling, shifting,
  96. dragging, and searching.  Operations on rectangular selections automatically
  97. fill in tabs and spaces to maintain alignment of text within and to the right
  98. of the selection.  Note that the interpretation of rectangular selections by
  99. Fill Paragraph is slightly different from that of other commands, the section
  100. titled "TEXT FILLING" has details.
  101.  
  102. The middle mouse button can be used to make an additional selection (called the
  103. secondary selection).  As soon as the button is released, the contents of this
  104. selection will be copied to the insert position of the window where the mouse
  105. was last clicked (the destination window).  This position is marked by a caret
  106. shaped cursor when the mouse is outside of the destination window.  If there is
  107. a (primary) selection, adjacent to the cursor in the window, the new text will
  108. replace the selected text.  Holding the shift key while making the secondary
  109. selection will move the text, deleting it at the site of the secondary
  110. selection, rather than copying it.
  111.  
  112. Selected text can also be dragged to a new location in the file using the
  113. middle mouse button.  Holding the shift key while dragging the text will copy
  114. the selected text, leaving the original text in place.  Holding the control key
  115. will drag the text in overlay mode.
  116.  
  117. Normally, dragging moves text by removing it from the selected position at the
  118. start of the drag, and inserting it at a new position relative to to the
  119. mouse.  Dragging a block of text over existing characters, displaces the
  120. characters to the end of the selection.  In overlay mode, characters which are
  121. occluded by blocks of text being dragged are simply removed.  When dragging
  122. non-rectangular selections, overlay mode also converts the selection to
  123. rectangular form, allowing it to be dragged outside of the bounds of the
  124. existing text.
  125.  
  126. The section "Using the Mouse" sumarizes the mouse commands for making primary
  127. and secondary selections.  Primary selections can also be made via keyboard
  128. commands, see "Keyboard Shortcuts".
  129.  
  130. The easiest way to copy and move text around in your file or between windows,
  131. is to use the clipboard, an imaginary area that temporarily stores text and
  132. data.  The Cut command removes the selected text (see Selecting Text) from your
  133. file and places it in the clipboard.  Once text is in the clipboard, the Paste
  134. command will copy it to the insert position in the current window.  For
  135. example, to move some text from one place to another, select it by dragging the
  136. mouse over it, choose Cut to remove it, click the pointer to move the insert
  137. point where you want the text inserted, then choose Paste to insert it.  Copy
  138. copies text to the clipboard without deleting it from your file.  You can also
  139. use the clipboard to transfer text to and from other Motif programs and X
  140. programs which make proper use of the clipboard.
  141.  
  142.  
  143. FINDING AND REPLACING TEXT
  144.  
  145. The Search menu contains a number of commands for finding and replacing text.
  146.  
  147. The Find... and Replace... commands present dialogs for entering text for
  148. searching and replacing.  These dialogs also allow you to choose whether you
  149. want the search to be sensitive to upper and lower case, or whether to use the
  150. standard Unix pattern matching characters (regular expressions).  Searches
  151. begin at the current text insertion position.
  152.  
  153. Find Again and Replace Again repeat the last find or replace command without
  154. prompting for search strings.  To selectively replace text, use the two
  155. commands in combination: Find Again, then Replace Again if the highlighted string
  156. should be replaced, or Find Again again to go to the next string.
  157.  
  158. Find Selection searches for the text contained in the current primary selection
  159. (see Selecting Text).  The selected text does not have to be in the current
  160. editor window, it may even be in another program.  For example, if the word dog
  161. appears somewhere in a window on your screen, and you want to find it in the
  162. file you are editing, select the word dog by dragging the mouse across it,
  163. switch to your NEdit window and choose Find Selection from the Search menu.
  164.  
  165. Searching Backwards
  166.  
  167. Holding down the shift key while choosing any of the search or replace commands
  168. from the menu (or using the keyboard shortcut), will search in the reverse
  169. direction.  Users who have set the search direction using the buttons in the
  170. search dialog, may find it a bit confusing that Find Again and Replace Again
  171. don't continue in the same direction as the original search (for experienced
  172. users, consistency of the direction implied by the shift key is more
  173. important). 
  174.  
  175. Selective Replacement
  176.  
  177. To replace only some occurrences of a string within a file, choose Replace...
  178. from the Search menu, enter the string to search for and the string to
  179. substitute, and finish by pressing the Find button.  When the first occurrence
  180. is highlighted, use either Replace Again (^A) to replace it, or Find Again (^G)
  181. to move to the next occurrence without replacing it, and continue in such a
  182. manner through all occurrences of interest.
  183.  
  184. To replace all occurrences of a string within some range of text, select the
  185. range (see Selecting Text), choose Replace... from the search menu, type the
  186. string to search for and the string to substitute, and press the "R. in
  187. Selection" button in the dialog.  Note that selecting text in the Replace...
  188. dialog will unselect the text in the window.
  189.  
  190. Regular Expressions
  191.  
  192. Regular expressions are available in the Find... and Replace... dialogs as a
  193. way to match inexact sequences of characters.  Regular expression substitution
  194. can also be used to program automatic editing operations.  For example, the
  195. following are search and replace strings to find occurences of the subroutine
  196. get_x, reverse the first and second parameters, add a third parameter of NULL,
  197. and change the name to new_get_x":
  198.  
  199.     Search string:  get_x\(([^ ,]*), ([^\)]*)\)
  200.     Replace string: new_get_x(\2, \1, NULL)
  201.  
  202. To use regular expressions, click on the Regular Expression button in the
  203. Find... or Replace... dialogs before doing a search or replacement.
  204.  
  205. Regular Expression Syntax
  206.  
  207. The components of a regular expression are: branches, pieces, atoms, and
  208. ranges. A regular expression consists of zero or more branches, separated by
  209. `|'.  It matches anything that matches one of the branches.
  210.  
  211. A branch is zero or more pieces, concatenated.  It matches a match for the
  212. first, followed by a match for the second, etc.
  213.  
  214. A piece is an atom possibly followed by `*', `+', or `?'.  An atom followed by
  215. `*' matches a sequence of 0 or more matches of the atom.  An atom followed by
  216. `+' matches a sequence of 1 or more matches of the atom.  An atom followed by
  217. `?' matches a match of the atom, or the null string.
  218.  
  219. An atom is a regular expression in parentheses (matching a match for the
  220. regular expression), a range (see below), `.' (matching any single character),
  221. `^' (matching the null string at the beginning of a line string), `$' (matching
  222. the null string at the end of a line), a `\' followed by a single character
  223. (matching that character), or a single character with no other significance
  224. (matching that character). \t, \n, \b, \r, and \f represent the characters tab
  225. newline, backspace, carriage return, and form feed.
  226.  
  227. A range is a sequence of characters enclosed in `[]'.  It normally matches any
  228. single character from the sequence.  If the sequence begins with `^', it
  229. matches any single character not from the rest of the sequence.  If two
  230. characters in the sequence are separated by `-', this is shorthand for the full
  231. list of ASCII characters between them (e.g. `[0-9]' matches any decimal
  232. digit).  To include a literal `]' in the sequence, make it the first character
  233. (following a possible `^').  To include a literal `-', make it the first or
  234. last character.  A backslash `\' followed by a single character includes that
  235. character, however backslashes are not necessary for most special characters,
  236. since inside a range, only the `]', `-', and '\' characters are treated
  237. specially.
  238.  
  239. Substitution
  240.  
  241. Wherever the substitution string contains the character `&', NEdit will
  242. substitute the the entire string that was matched in the Find operation.  Up to
  243. nine sub-expressions of the match string can also be inserted into the
  244. replacement string, using `\' followed by a digit. \1 through \9 represent the
  245. strings that matched parenthesized expressions within the regular expression,
  246. numbered left-to-right in order of their opening parentheses.  Preceding & or
  247. \1-9 with \U, \u, \L, or \l adjusts the case of the inserted text.  \u and \l
  248. change only the first character, while \U and \L change the entire string to
  249. upper or lower case.  \t, \n, \b, \r, and \f represent the characters tab
  250. newline, backspace, carriage return, and form feed in a substitution string
  251. represent the tab and newline characters as they do in match strings.
  252.  
  253. Ambiguity
  254.  
  255. If a regular expression could match two different parts of the text, it will
  256. match the one which begins earliest.  If both begin in the same place but match
  257. different lengths, or match the same length in different ways, life gets
  258. messier, as follows.
  259.  
  260. In general, the possibilities in a list of branches are considered in
  261. left-to-right order, the possibilities for `*', `+', and `?' are considered
  262. longest-first, nested constructs are considered from the outermost in, and
  263. concatenated constructs are considered leftmost-first.  The match that will be
  264. chosen is the one that uses the earliest possibility in the first choice that
  265. has to be made.  If there is more than one choice, the next will be made in the
  266. same manner (earliest possibility) subject to the decision on the first
  267. choice.  And so forth.
  268.  
  269. For example, `(ab|a)b*c' could match `abc' in one of two ways.  The first
  270. choice is between `ab' and `a'; since `ab' is earlier, and does lead to a
  271. successful overall match, it is chosen.  Since the `b' is already spoken for,
  272. the `b*' must match its last possibility-the empty string-since it must respect
  273. the earlier choice.
  274.  
  275. In the particular case where no `|'s are present and there is only one `*',
  276. `+', or `?', the net effect is that the longest possible match will be chosen. 
  277. So `ab*', presented with `xabbbby', will match `abbbb'. Note that if `ab*' is
  278. tried against `xabyabbbz', it will match `ab' just after `x', due to the
  279. begins-earliest rule.  (In effect, the decision on where to start the match is
  280. the first choice to be made, hence subsequent choices must respect it even if
  281. this leads them to less-preferred alternatives.)
  282.  
  283.  
  284. FEATURES FOR PROGRAMMERS
  285.  
  286. Indentation
  287.  
  288. With Auto Indent turned on (the default), NEdit keeps a running indent.  When
  289. you press the return key, space and tabs are inserted to line up the insert
  290. point under the start of the previous line.  Ctrl+Return in auto-indent mode
  291. acts like a normal return, With auto-indent turned off, Ctrl+Return does
  292. indentation.
  293.  
  294. The Shift Left and Shift Right commands adjust the indentation for several
  295. lines at once.  To shift a block of text one character to the right, select the
  296. text, then choose Shift Right from the Edit menu.  Note that the accelerator
  297. keys for these menu items are Ctrl+9 and Ctrl+0, which correspond to  the right
  298. and left parenthesis on most keyboards.  Remember them as adjusting the text in
  299. the direction pointed to by the parenthesis character.  Holding the Shift key
  300. while selecting either Shift Left or Shift Right will shift the text by one tab
  301. stop.
  302.  
  303. Tabs
  304.  
  305. Most Unix programs for text display and processing, assume an eight character
  306. tab.  Unfortunately, an 8 character tab is not convenient for programming in C,
  307. C++, and other structured languages.  Inside of NEdit and other editors that
  308. allow you to change the interpretation of the tab character, it is much easier
  309. to work with C code when the tab distance is set to match the program
  310. indentation distance, usually 3 or 4 characters.  However, there are serious
  311. tradeoffs to using non-standard tabs.  In addition to many Unix utilities not
  312. displaying or interpreting the files correctly, other programmers may not
  313. interpret the files correctly, or may use editors which can't display or edit
  314. the files properly. 
  315.  
  316. An alternative to changing the interpretation of the tab character is tab
  317. emulation.  In the Tabs... dialog, turning on Emulated Tabs causes the Tab key
  318. to insert the correct number of spaces and/or tabs to bring the cursor the next
  319. emulated tab stop, as if tabs were set at the emulated tab distance rather than
  320. the hardware tab distance.  Backspacing immediately after entering an emulated
  321. tab will delete it as a unit, but as soon as you move the cursor away from the
  322. spot, NEdit will forget that the collection of spaces and tabs is a tab, and
  323. will treat it as separate characters.  To enter a real tab character with
  324. "Emulate Tabs" turned on, use Ctrl+Tab.
  325.  
  326. It is also possible to tell NEdit not to insert ANY tab characters at all in
  327. the course of processing emulated tabs, and in shifting and rectangular
  328. insertion/deletion operations, for programmers who worry about the
  329. misinterpretation of tab characters on other systems. 
  330.  
  331. Line Numbers
  332.  
  333. To find a particular line in a source file by line number, choose Goto Line
  334. #... from the Search menu.  You can also directly select the line number text
  335. in the compiler message in the terminal emulator window (xterm, decterm,
  336. winterm, etc.) where you ran the compiler, and choose Goto Selected from the
  337. Search menu.  Note that under AIXWindows (IBM), selections in aixterms appear
  338. to go away when you release the mouse, but they are actually retained and can
  339. be used by NEdit and other programs that use selections.
  340.  
  341. To find out the line number of a particular line in your file, turn on
  342. Statistics Line in the Preferences menu and position the insertion point
  343. anywhere on the line.  The statistics line continuously updates the line number
  344. of the line containing the cursor.
  345.  
  346. Matching Parentheses
  347.  
  348. To help you inspect nested parentheses, brackets, braces, quotes, and other
  349. characters, NEdit has both an automatic parenthesis matching mode, and a Find
  350. Matching command.  Automatic parenthesis matching is activated when you type,
  351. or move the insertion cursor after a parenthesis, bracket, or brace.  It
  352. momentarily highlights the matching character if that character is visible in
  353. the window.  To find a matching character anywhere in the file, select it or
  354. position the cursor after it, and choose Find Matching from the Search menu. 
  355. If the character matches itself, such as a quote or slash, select the first
  356. character of the pair.  NEdit will match {, (, [, <, ", ', `, /, and \.
  357.  
  358. Opening Included Files
  359.  
  360. The Open Selected command in the File menu understands the C preprocessor's
  361. #include syntax, so selecting an #include line and invoking Open Selected will
  362. generally find the file referred to, unless doing so depends on the settings of
  363. compiler switches or other information not available to NEdit.
  364.  
  365. Finding Subroutine and Data Declarations
  366.  
  367. NEdit can process tags files generated using the Unix ctags command.  Ctags
  368. creates index files correlating names of functions and declarations with their
  369. locations in C, Fortran, or Pascal source code files. (See the ctags manual
  370. page for more information).  Ctags produces a file called "tags" which can be
  371. loaded by NEdit.  Once loaded, the information in the tags file enables NEdit
  372. to go directly to the declaration of a highlighted function or data structure
  373. name with a single command.  To load a tags file, select "Load Tags File" from
  374. the File menu and choose a tags file to load, or specify the name of the tags
  375. file on the NEdit command line:
  376.  
  377.     nedit -tags tags
  378.  
  379. NEdit can also be set to load a tags file automatically when it starts up.
  380. Setting the X resource nedit.tagFile to the name of a tag file tells NEdit to
  381. look for that file at startup time (see Customizing NEdit).  The file name can
  382. be either a complete path name, in which case NEdit will always load the same
  383. tags file, or a file name without a path or with a relative path, in which case
  384. NEdit will load it starting from the current directory.  The second option
  385. allows you to have different tags files for different projects, each
  386. automatically loaded depending on the directory you're in when you start
  387. NEdit.  Setting the name to "tags" is an obvious choice since this is the name
  388. that ctags uses.
  389.  
  390. To find the definition of a function or data structure once a tags file is
  391. loaded, select the name anywhere it appears in your program (see SELECTING,
  392. CUTTING, and PASTING) and choose "Find Definition" from the Search menu.
  393.  
  394.  
  395. USING THE MOUSE
  396.  
  397. NEdit is one of the most mouse interactive text editors around, but you don't
  398. need to know all of the details below to be productive.  You can get by with
  399. just the left mouse button, clicking to move the cursor, and dragging to make a
  400. selection.
  401.  
  402. This section will make more sense if you also read the section called,
  403. SELECTING, CUTTING, and PASTING, which explains the terminology of selections,
  404. i.e. what is meant by primary, secondary, rectangular, etc.
  405.  
  406. The general meaning of mouse buttons and modifier keys is as follows:
  407.  
  408.     Buttons
  409.  
  410.       Button 1 (left)    Cursor position and primary selection
  411.  
  412.       Button 2 (middle)  Secondary selections, and dragging and
  413.                      copying primary selection
  414.  
  415.     Modifier keys
  416.  
  417.       Shift   On primary selections, (left mouse button):
  418.              Extends selection to the mouse pointer
  419.               On secondary and copy operations, (middle):
  420.              Toggles between move and copy
  421.  
  422.       Ctrl    Makes selection rectangular or insertion
  423.               columnar
  424.  
  425.       Alt*    (on release) Exchange primary and secondary
  426.               selections.
  427.  
  428.  
  429. Button 1
  430.  
  431.     The left mouse button is used to position the cursor and to make primary
  432.     selections.
  433.  
  434.       Click             Moves the cursor
  435.  
  436.       Double Click    Selects a whole word
  437.  
  438.       Triple Click    Selects a whole line
  439.  
  440.       Quadruple Click    Selects the whole file
  441.  
  442.       Shift Click    Adjusts (extends or shrinks) the selection,
  443.                           or if there is no existing selection, begins a
  444.                           new selection between the cursor and the mouse.
  445.  
  446.       Ctrl+Shift+Click    Adjusts (extends or shrinks) the selection
  447.                        rectangularly.
  448.  
  449.       Drag        Selects text between where the mouse was pressed
  450.                           and where it was released.
  451.  
  452.       Ctrl+Drag         Selects rectangle between where the mouse was
  453.                           pressed and where it was released.
  454.  
  455.  
  456. Button 2
  457.  
  458.    The middle mouse button is for making secondary selections, and copying and
  459.    dragging the primary selection
  460.  
  461.       Click       Copies the primary selection to the clicked position.
  462.  
  463.       Shift+Click  Moves the primary selection to the clicked position,
  464.             deleting it from its original position.
  465.  
  466.       Drag       1) Outside of the primary selection:
  467.                   Begins a secondary selection.
  468.             2) Inside of the primary selection:
  469.                   Moves the entire selection by dragging.
  470.  
  471.       Ctrl+Drag    1) Outside of the primary selection:
  472.                   Begins a rectangular secondary selection.
  473.             2) Inside of the primary selection:
  474.                   Drags the selection in overlay mode (see below).
  475.  
  476. When the mouse button is released after creating a secondary selection:
  477.  
  478.    No Modifiers  If there is a primary selection, replaces it with the
  479.             secondary selection.  Otherwise, inserts the secondary
  480.             selection at the cursor position.
  481.  
  482.    Shift     Move the secondary selection, deleting it from its
  483.             original position.  If there is a primary selection,
  484.             the move will replace the primary selection with the
  485.             secondary selection. Otherwise, moves the secondary
  486.             selection to to the cursor position.
  487.  
  488.    Alt*      Exchange the primary and secondary selections.
  489.  
  490.  
  491. While moving the primary selection by dragging with the middle mouse button:
  492.  
  493.    Shift   Leaves a copy of the original selection in place rather than
  494.           removing it or blanking the area.
  495.  
  496.    Ctrl    Changes from insert mode to overlay mode (see below).
  497.  
  498.    Escape  Cancels drag in progress.
  499.  
  500. Overlay Mode: Normally, dragging moves text by removing it from the selected
  501. position at the start of the drag, and inserting it at a new position relative
  502. to to the mouse. When you drag a block of text over existing characters, the
  503. existing characters are displaced to the end of the selection.  In overlay
  504. mode, characters which are occluded by blocks of text being dragged are simply
  505. removed.  When dragging non-rectangular selections, overlay mode also converts
  506. the selection to rectangular form, allowing it to be dragged outside of the
  507. bounds of the existing text. 
  508.  
  509. * The Alt key may be labeled Meta or Compose-Character on some keyboards.  Some
  510. window managers, including default configurations of mwm, bind combinations of
  511. the Alt key and mouse buttons to window manager operations.  In NEdit, Alt is
  512. only used on button release, so regardless of the window manager bindings for
  513. Alt-modified mouse buttons, you can still do the corresponding NEdit operation
  514. by using the Alt key AFTER the initial mouse press, so that Alt is held while
  515. you release the mouse button.  If you find this difficult or annoying, you can
  516. re-configure most window managers to skip this binding, or you can re-configure
  517. NEdit to use a different key combination.
  518.  
  519.  
  520. KEYBOARD SHORTCUTS
  521.  
  522. Most of the keyboard shortcuts in NEdit are shown on the right hand sides of
  523. the pull-down menus.  However, there are more which are not as obvious.  These
  524. include; dialog button shortcuts; menu and dialog mnemonics; labeled keyboard
  525. keys, such as the arrows, page-up, page-down, and home; and optional Shift
  526. modifiers on accelerator keys, like [Shift]Ctrl+F.
  527.  
  528. Menu Accelerators
  529.  
  530. Pressing the key combinations shown on the right of the menu items is a
  531. shortcut for selecting the menu item with the mouse.  Some items have the shift
  532. key enclosed in brackets, such as [Shift]Ctrl+F.  This indicates that the shift
  533. key is optional.  In search commands, including the shift key reverses the
  534. direction of the search.  In Shift commands, it makes the command shift the
  535. selected text by a whole tab stop rather than by single characters.
  536.  
  537. Menu Mnemonics
  538.  
  539. Pressing the Alt key in combination with one of the underlined characters in
  540. the menu bar pulls down that menu.  Once the menu is pulled down, typing the
  541. underlined characters in a menu item (without the Alt key) activates that
  542. item.  With a menu pulled down, you can also use the arrow keys to select menu
  543. items, and the space or enter keys to activate them.
  544.  
  545. Keyboard Shortcuts within Dialogs
  546.  
  547. One button in a dialog is usually marked with a thick indented outline. 
  548. Pressing the Return or Enter key activates this button.
  549.  
  550. All dialogs have either a Cancel or Dismiss button.  This button can be
  551. activated by pressing the Escape (or Esc) key.
  552.  
  553. Pressing the tab key moves the keyboard focus to the next item in a dialog. 
  554. Within an associated group of buttons, the arrow keys move the focus among the
  555. buttons.  Shift+Tab moves backward through the items.
  556.  
  557. Most items in dialogs have an underline under one character in their name. 
  558. Pressing the Alt key along with this character, activates a button as if you
  559. had pressed it with the mouse, or moves the keyboard focus to the associated
  560. text field or list.
  561.  
  562. You can select items from a list by using the arrow keys to move the selection
  563. and space to select.
  564.  
  565. In file selection dialogs, you can type the beginning characters of the file
  566. name or directory in the list to select files
  567.  
  568. Labeled Function Keys 
  569.  
  570. The labeled function keys on standard workstation and PC keyboards, like the
  571. arrows, and page-up and page-down, are active in NEdit, though not shown in the
  572. pull-down menus. 
  573.  
  574. Holding down the control key while pressing a named key extends the scope of
  575. the action that it performs.  For example, Home normally moves the insert
  576. cursor the beginning of a line.  Ctrl+Home moves it to the beginning of the
  577. file. Backspace deletes one character, Ctrl+Backspace deletes one word. 
  578.  
  579. Holding down the shift key while pressing a named key begins or extends a
  580. selection.  Combining the shift and control keys combines their actions.  For
  581. example, to select a word without using the mouse, position the cursor at the
  582. beginning of the word and press Ctrl+Shift+RightArrow.  The Alt key modifies
  583. selection commands to make the selection rectangular. 
  584.  
  585. Under X and Motif, there are several levels of translation between keyboard
  586. keys and the actions they perform in a program.  The "Customizing NEdit", and
  587. "X Resources" sections of the Help menu have more information on this subject. 
  588. Because of all of this configurability, and since keyboards and standards for
  589. the meaning of some keys vary from machine to machine, the mappings may be
  590. changed from the defaults listed below. 
  591.  
  592. Modifier Keys (in general)
  593.  
  594.   Ctrl     Extends the scope of the action that the key would otherwise
  595.       perform.  For example, Home normally moves the insert cursor the
  596.       beginning of a line. Ctrl+Home moves it to the beginning of the
  597.       file.  Backspace deletes one character, Ctrl+ Backspace deletes
  598.       one word.
  599.  
  600.   Shift  Extends the selection to the cursor position. If there's no
  601.       selection, begins one between the old and new cursor positions.
  602.  
  603.   Alt     When modifying a selection, makes the selection rectangular.
  604.  
  605. (For the effects of modifier keys on mouse button presses, see the section
  606. titled "Using the Mouse")
  607.  
  608. All Keyboards
  609.  
  610.   Escape    Cancels operation in progress: menu selection, drag,
  611.           selection, etc.  Also equivalent to cancel button in
  612.           dialogs.
  613.  
  614.   Backspace    Delete the character before the cursor
  615.  
  616.   Ctrl+BS    Delete the word before the cursor
  617.  
  618.   Arrows
  619.  
  620.     Left    Move the cursor to the left one character
  621.  
  622.     Ctrl+Left   Move the cursor backward one word (Word delimiters
  623.             are settable, see Customizing NEdit, and X Resources)
  624.  
  625.     Right    Move the cursor to the right one character
  626.  
  627.     Ctrl+Right  Move the cursor forward one word
  628.  
  629.     Up      Move the cursor up one line
  630.  
  631.     Ctrl+Up    Move the cursor up one paragraph.  (Paragraphs are
  632.                 delimited by blank lines.)
  633.  
  634.     Down    Move the cursor down one line.
  635.  
  636.     Ctrl+Down    Move the cursor down one paragraph.
  637.  
  638.   Ctrl+Return    Return with automatic indent, regardless of the setting
  639.                 of Auto Indent.
  640.  
  641.   Shift+Return    Return without automatic indent, regardless of the
  642.           setting of Auto Indent.
  643.  
  644.   Ctrl+Tab    Insert an ascii tab character, without processing
  645.           emulated tabs.
  646.  
  647.   Alt+Ctrl+<c>    Insert the control-code equivalent of a key <c>
  648.  
  649.   Ctrl+/    Select everything (same as Select All menu item or ^A)
  650.  
  651.   Ctrl+\    Unselect
  652.  
  653.   Ctrl+U    Delete to start of line
  654.  
  655. PC Standard Keyboard
  656.  
  657.   Ctrl+Insert    Copy the primary selection to the clipboard (same as
  658.          Copy menu item or ^C) for compatibility with Motif
  659.          standard key binding
  660.  
  661.   Shift+Ctrl+
  662.   Insert    Copy the primary selection to the cursor location.
  663.  
  664.   Delete    Delete the character before the cursor. (Can be
  665.          configured to delete the character after the cursor,
  666.          see Customizing NEdit, and X Resources)
  667.  
  668.  
  669.   Ctrl+Delete    Delete to end of line.
  670.  
  671.   Shift+Delete    Cut, remove the currently selected text and place it
  672.          in the clipboard. (same as Cut menu item or ^X) for
  673.          compatibility with Motif standard key binding.
  674.  
  675.   Shift+Ctrl+
  676.   Delete    Cut the primary selection to the cursor location.
  677.  
  678.   Home        Move the cursor to the beginning of the line.
  679.  
  680.   Ctrl+Home    Move the cursor to the beginning of the file.
  681.  
  682.   End        Move the cursor to the end of the line.
  683.  
  684.   Ctrl+End    Move the cursor to the end of the file.
  685.  
  686.   PageUp    Scroll and move the cursor up by one page.
  687.  
  688.   Ctrl+PageUp   Scroll and move the cursor left by one page.
  689.   
  690.   PageDown    Scroll and move the cursor down by one page.
  691.  
  692.   Ctrl+PageDown Scroll and move the cursor right by one page.
  693.  
  694.   F10        Make the menu bar active for keyboard input (Arrow
  695.           Keys, Return, Escape, and the Space Bar)
  696.  
  697.  
  698. Specialty Keyboards 
  699.  
  700. On machines with different styles of keyboards, generally, text editing actions
  701. are properly matched to the labeled keys, such as Remove, Next-screen, etc.. 
  702. If you prefer different key bindings, see the heading titled "Binding Keys to
  703. Actions" in the X RESOURCES section below.
  704.  
  705.  
  706. TEXT FILLING
  707.  
  708. The Fill Paragraph command in NEdit is important for anyone who types plain
  709. blocks of text.  In a plain text file, there is no way to store any additional
  710. format information, like a word processor might do.  This makes it impossible
  711. for the editor to tell parts of the text belong together as a paragraph from
  712. carefully arranged individual lines. (In continuous wrap mode, you can acheive
  713. this affect by omitting newlines within paragraphs, but files with extremely
  714. long lines are not standard in Unix, and may not be compatible with all
  715. tools).  So, unless you're operating in continuous wrap mode, editing in the
  716. middle of a paragraph will usually leave the lines messy and uneven.
  717.  
  718. Since NEdit can't act automatically to keep your text lined up, you need to
  719. tell it explicitly where to operate, and that is what Fill Paragraph is for. 
  720. It arranges lines to fill the space between two margins, wrapping the lines
  721. neatly at word boundaries.  Normally, the left margin for filling is inferred
  722. from the text being filled, the left edge of the text, or the furthest left
  723. non-whitespace character.  The right margin is either the Wrap Margin, set in
  724. the preferences menu (by default, the right edge of the window), or can also be
  725. chosen on the fly by using a rectangular selection (see below).
  726.  
  727. There are three ways to use Fill Paragraph.  The simplest is, while you are
  728. typing text, and there is no selection, simply select Fill Paragraph (or type
  729. Ctrl+J), and NEdit will arrange the text in the paragraph adjacent to the
  730. cursor.  A paragraph, in this case, means an area of text delimited by blank
  731. lines.
  732.  
  733. The second way to use Fill Paragraph is with a selection.  If you select a
  734. range of text and then chose Fill Paragraph, all of the text in the selection
  735. will be filled.  Again, continuous text between blank lines is interpreted as
  736. paragraphs and filled individually. 
  737.  
  738. The third way to use Fill Paragraph is with a rectangular selection.  Fill
  739. Paragraph treats rectangular selections differently from other commands. 
  740. Instead of simply filling the text inside the rectangular selection, NEdit
  741. interprets the right edge of the selection as the requested wrap margin.  Text
  742. to the left of the selection is not disturbed (the usual interpretation of a
  743. rectangular selection), but text to the right of the selection is included in
  744. the operation and is pulled in to the selected region.
  745.  
  746.  
  747. SHIFT LEFT, SHIFT RIGHT
  748.  
  749. While shifting blocks of text is most important for programmers (See Features
  750. for Programming), it is also useful for other tasks, such as creating indented
  751. paragraphs. 
  752.  
  753. To shift a block of text one tab stop to the right, select the text, then
  754. choose Shift Right from the Edit menu.  Note that the accelerator keys for
  755. these menu items are Ctrl+9 and Ctrl+0, which correspond to the right and left
  756. parenthesis on most keyboards.  Remember them as adjusting the text in the
  757. direction pointed to by the parenthesis character.  Holding the Shift key while
  758. selecting either Shift Left or Shift Right will shift the text by one character.
  759.  
  760. It is also possible to shift blocks of text by selecting the text
  761. rectangularly, and dragging it left or right (and up or down as well).  Using a
  762. rectangular selection also causes tabs within the selection to be recalculated
  763. and substituted, such that the non-whitespace characters remain stationary with
  764. respect to the selection.
  765.  
  766.  
  767. SHELL COMMANDS/FILTERS
  768.  
  769. The Shell menu (Unix versions only) allows you to execute Unix shell commands
  770. from within NEdit.  You can add items to the menu to extend NEdit's command set
  771. or to incorporate custom automatic editing features using shell commands or
  772. editing languages like awk and sed.  To add items to the menu, use the Shell
  773. Commands... dialog in the Preferences menu under Default Settings.  NEdit comes
  774. pre-configured with a few useful Unix commands like spell and sort, but we
  775. encourage you to add your own custom extensions.
  776.  
  777. Filter Selection... prompts you for a Unix command to use to process the
  778. currently selected text.  The output from this command replaces the contents of
  779. the selection.
  780.  
  781. Execute Command... prompts you for a Unix command and replaces the current
  782. selection with the output of the command.  If there is no selection, it
  783. deposits the output at the current insertion point.
  784.  
  785. Execute Command Line uses the position of the cursor in the window to indicate
  786. a line to execute as a shell command line.  The cursor may be positioned
  787. anywhere on the line.  This command allows you to use an NEdit window as an
  788. editable command window for saving output and saving commands for re-execution.
  789.  
  790. The X resource called nedit.shell (See Customizing NEdit) determines which Unix
  791. shell is used to execute commands.  The default value for this resource is
  792. /bin/csh.
  793.  
  794.  
  795. LEARN/REPLAY
  796.  
  797. Selecting Learn Keystrokes from the Macro menu puts NEdit in learn mode.  In
  798. learn mode, keystrokes and menu commands are recorded, to be played back later,
  799. using the Replay Keystrokes command, or pasted into a macro in the Macro
  800. Commands dialog of the Default Settings menu in Preferences. 
  801.  
  802. Note that only keyboard and menu commands are recorded, not mouse clicks or
  803. mouse movements since these have no absolute point of reference, such as cursor
  804. or selection position.  When you do a mouse-based operation in learn mode,
  805. NEdit will beep (repeatedly) to remind you that the operation was not recorded. 
  806.  
  807.  
  808. MACROS
  809.  
  810. NEdit 4.0 has a very limited ability to process macros.  Macro commands can use
  811. all of NEdit's editing functionality, available from either the keyboard or
  812. menus, however, there is not yet a macro "language".  That is, you can't use
  813. branching or looping, and can't set or test variables.
  814.  
  815. The way to accomplish more complex editing tasks, is still to use the Shell
  816. Commands dialog to attach programs written in awk, sed, Perl, etc.
  817.  
  818. As they stand, macros are useful for saving Learn/Replay sequences, for limited
  819. key-binding, and, surprisingly, many very complex tasks can be coded in terms
  820. of regular expression substitutions.
  821.  
  822. Key binding via macros is simpler than any other method available in NEdit,
  823. because you don't have to deal with X resources or translation table syntax. 
  824. However, the only way to change menu accelerator keys is through X resources,
  825. and if you try to do a lot key binding via the Macro Commands dialog, you will
  826. quickly end up with a very large Macro menu. 
  827.  
  828. A macro in this version of NEdit is simply a list of newline-separated
  829. actions.  NEdit action routines are listed in the Action Routines section of
  830. the Help menu.  The easiest way to write a macro, is to record keystrokes and
  831. menu choices in learn mode, then paste the macro in the Macro Commands dialog,
  832. using the Paste Learn/Replay Macro button.
  833.  
  834.  
  835. SERVER MODE AND NC
  836.  
  837. NEdit can be operated on its own, or as a two-part client/server application. 
  838. Client/server mode is useful for integrating NEdit with software development
  839. environments, mailers, and other programs; or just as a quick way to open files
  840. from the shell command line without starting a new NEdit session.
  841.  
  842. To run NEdit in server mode, type:
  843.  
  844. nedit -server
  845.  
  846. NEdit can also be started in server mode via the nc program when no servers are
  847. available.
  848.  
  849. The nc (for NEdit Client) program, which is distributed along with nedit, sends
  850. commands to an nedit server to open files, select lines, or execute editor
  851. actions.  It accepts a limited set of the nedit command line options: -read,
  852. -create, -line (or +n), -do, and a list of file names.  Listing a file on the
  853. nc command line means, open it if it is not already open and bring the window
  854. to the front.  -read and -create affect only newly opened files, but -line and
  855. -do can also be used on files which are already open (See  "NEdit Command Line"
  856. for more information).
  857.  
  858. In typical Unix style, arguments affect the files which follow them on the
  859. command line, for example:
  860.  
  861.     incorrect:   nc file.c -line 25
  862.     correct:     nc -line 25 file.c
  863.  
  864. nc also accepts one command line option of its own, -noask (or -ask), which
  865. instructs it whether to automatically start a server if one is not available. 
  866. This is also settable via the X resource, nc.autoStart (See X Resources below).
  867.  
  868. Sometimes it is useful to have more than one NEdit server running, for example
  869. to keep mail and programming work separate, or more importantly for working
  870. with tools like ClearCase which provide different views of the file system from
  871. different shells.  The option, -svrname, to both nedit and nc, allow you to
  872. start, and communicate with, separate named servers.  A named server responds
  873. only to requests with the corresponding -svrname argument.
  874.  
  875. Communication between nc and nedit is through the X display.  So as long as X
  876. windows is set up and working properly, nc will will work properly as well.  nc
  877. uses the DISPLAY environment variable, the machine name and your user name to
  878. find the appropriate server, meaning, if you have several machines sharing a
  879. common file system, nc will not be able to find a server that is running on a
  880. machine with a different host name, even though it may be perfectly appropriate
  881. for editing a given file.
  882.  
  883. The command which nc uses to start an nedit server is settable via the X
  884. resource nc.serverCommand, by default, "nedit -server".
  885.  
  886.  
  887. CRASH RECOVERY
  888.  
  889. If a system crash, network failure, X server crash, or program error should
  890. happen while you are editing a file, you can easily recover most of your work.
  891. NEdit maintains a backup file which it updates periodically (every 8 editing
  892. operations or 30 characters typed under Unix, or 80 characters under VMS).
  893. This file is has the same name as the file that you are editing, but with the
  894. character "~" (tilde) on Unix or "_" (underscore) on VMS prefixed to the name.
  895. To recover a file after a crash, simply rename the file to remove the tilde 
  896. or underscore character, replacing the older version of the file.  Because 
  897. several of the Unix shells consider the tilde to be a special character, you 
  898. may have to prefix the character with a "\" (backslash) when you move or 
  899. delete an NEdit backup file.
  900.  
  901. Example, to recover the file called "help.c" type the command:
  902.  
  903.     mv \~help.c help.c
  904.     
  905. On VMS, type:
  906.     
  907.     RENAME _HELP.C HELP.C
  908.  
  909.  
  910. THE NEDIT COMMAND LINE
  911.  
  912. nedit [-read] [-create] [-line n | +n] [-server] [-do command] [-tags file]
  913.     [-tabs n] [-wrap] [-nowrap] [-autowrap] [-autoindent] [-noautoindent]
  914.     [-autosave] [-noautosave] [-rows n] [-columns n] [-font font]
  915.     [-geometry geometry] [-display [host]:server[.screen]
  916.     [-xrm resourcestring] [-svrname name] [file...]
  917.  
  918.     -read -- Open the file Read Only regardless of the actual file
  919.         protection.
  920.  
  921.     -create -- Don't warn about file creation when a file doesn't exist.
  922.  
  923.     -line n (or +n) -- Go to line number n
  924.  
  925.     -server -- Designate this session as an NEdit server, for processing
  926.         commands from the nc program.  nc can be used to interface NEdit
  927.         to code development environments, mailers, etc., or just as a
  928.         quick way to open files from the shell command line without
  929.         starting a new NEdit session.
  930.  
  931.     -do command -- Execute an NEdit action routine. on each file following
  932.         the -do argument on the command line.  -do is particularly useful
  933.         from the nc program, where nc -do can remotely execute commands in
  934.         an nedit -server session.
  935.  
  936.  
  937.     -tags file -- Load a file of directions for finding definitions of
  938.         program subroutines and data objects.  The file must be of the
  939.         format generated by the Unix ctags command.
  940.  
  941.     -tabs n -- Set tab stops every n characters.
  942.  
  943.     -wrap, -nowrap -- Wrap long lines at the right edge of the window
  944.     rather than continuing them past it.  (Continuous Wrap mode)
  945.     
  946.     -autowrap, -noautowrap -- Wrap long lines when the cursor reaches
  947.     the right edge of the window by inserting newlines at word
  948.     boundaries.  (Auto Newline Wrap mode)
  949.  
  950.     -autoindent, noautoindent -- Maintain a running indent.
  951.  
  952.     -autosave, -noautosave -- Maintain a backup copy of the file being
  953.         edited under the name ~filename  (on Unix) or _filename (on VMS).
  954.  
  955.     -rows n -- Default height in characters for an editing window.
  956.  
  957.     -columns n -- Default width in characters for an editing window.
  958.  
  959.     -font font (or -fn font) -- Font for text being edited (Font for
  960.         menus and dialogs can be set with -xrm "*fontList:font").
  961.  
  962.     -display [host]:server[.screen] -- The name of the X server to use.
  963.         host specifies the machine, server specifies the display server
  964.         number, and screen specifies the screen number.  host or screen
  965.         can be omitted and default to the local machine, and screen 0.
  966.  
  967.     -geometry geometry (or -g geometry) -- The initial size and/or
  968.         location of editor windows.  The argument has the form:
  969.  
  970.            [<width>x<height>][+|-][<xoffset>[+|-]<yoffset>]
  971.  
  972.         where <width> and <height> are the desired width and height of
  973.         the window, and <xoffset> and <yoffset> are the distance from
  974.         the edge of the screen to the window, + for top or left, - for
  975.         bottom or right.
  976.  
  977.     -background color (or -bg color) -- Background color. (background
  978.         color for text can be set separately with:
  979.         -xrm "nedit*text.background: color").
  980.  
  981.     -foreground color (or -fg color) -- Foreground color. (foreground
  982.         color for text can be set separately with:
  983.          -xrm "nedit*text.foreground: color").
  984.  
  985.     -xrm resourcestring -- Set the value of an X resource to override a
  986.         default value (see Customizing NEdit).
  987.  
  988.     -svrname name -- When starting nedit in server mode, name the
  989.     server, such that it responds to requests only when nc is given
  990.     a correspoding -svrname argument.  By naming servers, you can
  991.     run several simultaneously, and direct files and commands
  992.     specifically to any one.
  993.     
  994.  
  995. CUSTOMIZATION
  996.  
  997. NEdit can be customized in quite a number of ways.  The most important
  998. user-settable options are presented in the Preferences menu, including all
  999. options that users might need to change during an editing session.  Options set
  1000. in the Default Settings sub-menu of the Preferences menu can be preserved
  1001. between sessions by selecting Save Defaults, which writes a file called .nedit
  1002. in the user's home directory.  See the section titled "Preferences" for more
  1003. details.
  1004.  
  1005. User defined commands can be added to both NEdit's Shell and Macro menus. 
  1006. Dialogs for creating items in these menus can be found in the Default Settings
  1007. sub menu of the Preferences menu (labeled Shell Commands and Macro Commands). 
  1008. Since NEdit's macro facility is not yet well developed, the best way to add
  1009. complex automatic editing features is through shell commands that call programs
  1010. like awk and sed, rather than through NEdit macros.
  1011.  
  1012. For hard-core users who depend on NEdit every day and want to tune every
  1013. excruciating detail, there are also X resources for a vast number of such
  1014. details, down to the color of each individual button.  However, some options of
  1015. importance to average users are also set via X resources, most importantly, key
  1016. binding.  While limited key binding can be done through the Macro Commands
  1017. dialog in the Preferences menu, significant changes should be made via the
  1018. Translations resource and menu accelerator resources.  The section titled "X
  1019. Resources" has more information on setting X resources, as well as a list of
  1020. selected resources of interest to the average user.
  1021.  
  1022.  
  1023. PREFERENCES
  1024.  
  1025. The Preferences menu allows you to set options for both the current editing
  1026. window, and default values for newly created windows and future NEdit
  1027. sessions.  The first group of options in the Preferences menu take effect
  1028. immediately and refer to the current window only.  Options in the Default
  1029. Settings sub-menu have no effect on the current window, but instead provide
  1030. initial settings for future windows created using the New or Open commands. 
  1031. Preferences set in the Default Settings sub-menu can also be saved in a file
  1032. that is automatically read by NEdit at startup time, by selecting Save
  1033. Defaults.
  1034.  
  1035.     Auto Indent -- Maintain a running indent.  Pressing the return key will
  1036.         line up the cursor with the indent level of the previous line.
  1037.  
  1038.     AutoNewline Wrap -- Wrap text at word boundaries when the cursor
  1039.     reaches the right margin, by replacing the space or tab at the last
  1040.     word boundary with a newline character.
  1041.  
  1042.     Continuous Wrap -- Wrap long lines which extend past the right margin.
  1043.     This mode is typically used to produce files where newlines are
  1044.     ommitted within paragraphs, to make text filling automatic (a kind
  1045.     of poor-man's word processor).  Text of this style is common on
  1046.     Macs and PCs but is not necessarily supported very well under Unix
  1047.     (except in programs which deal with e-mail, for which it is often
  1048.     the format of choice).
  1049.  
  1050.     WrapMargin... -- Set margin for Auto Newline Wrap, Continuous Wrap, and
  1051.     Fill Paragraph.  By default, lines wrap at the right margin of the
  1052.     window, but a wrap margin can also be set at a specific column.
  1053.  
  1054.     Preserve Last Version -- On Save, write a backup copy of the file as it
  1055.         existed before the Save command with the extension .bck (Unix only).
  1056.  
  1057.     Incremental Backup -- Periodically make a backup copy of the file being
  1058.         edited under the name ~filename on Unix or _filename on VMS (see
  1059.         Crash Recovery).
  1060.  
  1061.     Show Matching (..) -- Momentarily highlight matching parenthesis,
  1062.         brackets, and braces when one of these characters is typed, or when
  1063.         the insertion cursor is positioned after it.
  1064.  
  1065.     Text Font... -- Set the font for the text in this NEdit window.  To set
  1066.         the font for all windows use the equivalent item in the Default
  1067.         Settings sub-menu.  Note that since the font selection dialog
  1068.         narrows its lists of font characteristics depending on those
  1069.         already selected, it is important to know that you can unselect
  1070.         them by clicking on the selected items a second time.
  1071.  
  1072.     Tabs -- Set the tab distance (number of characters between tab stops)
  1073.         for tab characters, and control tab emulation and use of tab
  1074.         characters in padding and emulated tabs.
  1075.  
  1076.     Statistics Line -- Show the full file name, line number, and length of
  1077.         the file being edited.
  1078.  
  1079.     Overtype -- In overtype mode, new characters entered replace the
  1080.     characters in front of the insertion cursor, rather than being
  1081.     inserted before them.  This preference can not be saved as a default.
  1082.  
  1083.     ReadOnly -- Lock the file against accidental modification.  This
  1084.     temporarily prevents the file from being modified in this NEdit
  1085.     session.  Note that this is diferent from setting the file
  1086.     protection.  This preference can not be saved as a default.
  1087.  
  1088.     Default Settings -- Sub-menu of initial settings for future windows.
  1089.         These are the same as the options in the main part of the menu, but
  1090.         apply as defaults for future windows created during this NEdit
  1091.         session.  These settings can be saved using the Save Defaults
  1092.         command below, to be loaded automatically each time NEdit is started.
  1093.  
  1094.     SaveDefaults -- Save the default options as set under Default Settings
  1095.         for future NEdit sessions.
  1096.  
  1097.  
  1098. X RESOURCES
  1099.         
  1100. NEdit has additional options to those provided in the Preferences menu which
  1101. are set using X resources.  Like most other X programs, NEdit can be customized
  1102. to vastly unnecessary proportions, from initial window positions down to the
  1103. font and shadow colors of each individual button (A complete discussion of how
  1104. to do this is left to books on the X Windows System).  Key binding (see
  1105. "Binding Keys to Actions" below) is one of the most useful of these resource
  1106. settable options.
  1107.  
  1108. X resources are usually specified in a file called .Xdefaults in your home
  1109. directory (on VMS this is sys$login:decw$xdefaults.dat).  On some systems, this
  1110. file is read and its information attached to the X server (your screen) when
  1111. you start X.  On other systems, the .Xdefaults file is read each time you run
  1112. an X program.  When X defaults are attached to the server, you can use a
  1113. program called xrdb to update them without restarting X.
  1114.  
  1115. The .nedit File
  1116.  
  1117. The .nedit (saved preferences) file is in the same format as an X resource
  1118. file, and its contents can be moved into your X resource file.  One reason for
  1119. doing so would be to attach server specific preferences, such as a default font
  1120. to a particular X server.  Another reason for moving preferences into the X
  1121. resource file would be to keep preferences menu options and resource settable
  1122. options together in one place. Though the files are the same format, additional
  1123. resources should not be added to the .nedit file, they will not be read, and
  1124. NEdit modifies this file by overwriting it completely.  Note also that the
  1125. contents of the .nedit file take precedence over the values of X resources. 
  1126. Using Save Defaults after moving the contents of your .nedit file to your
  1127. .Xdefaults file will re-create the .nedit file, interfering with the options
  1128. that you have moved.
  1129.  
  1130. Selected X Resource Names
  1131.  
  1132. The following are selected NEdit resource names and default values for NEdit
  1133. options not settable via the Preferences menu (for preference resource names,
  1134. see your .nedit file):
  1135.  
  1136.     nedit.tagFile: (not defined) -- The name of a file of the type produced
  1137.         by the Unix ctags command which NEdit will load at startup time
  1138.         (see Features for Programmers).  The tag file provides a database
  1139.         from which NEdit can automatically open files containing the
  1140.         definition of a particular subroutine or data type.
  1141.  
  1142.     nedit.shell: /bin/csh -- (Unix systems only) The Unix shell (command
  1143.         interpreter) to use for executing commands from the Shell menu
  1144.  
  1145.     nedit.wordDelimiters: .,/\\`'!@#%^&*()-=+{}[]":;<>? -- The characters,
  1146.         in addition to blanks and tabs, which mark the boundaries between
  1147.         words for the move-by-word (Ctrl+Arrow) and select-word (double
  1148.         click) commands.
  1149.  
  1150.     nedit.remapDeleteKey: True -- Setting this resource to False restores
  1151.         the original Motif binding of the delete key to forward-delete.
  1152.         This binding causes problems when X servers with one delete/
  1153.         backspace configuration are connected with X clients of the other.
  1154.         Users with a backspace key in the backspace/delete position and who
  1155.         use only machines with that style of keyboard can set this resource
  1156.         to False to get back the forward-delete function of the delete key.
  1157.  
  1158.     nedit.stdOpenDialog: False -- Setting this resource to True restores the
  1159.         standard Motif style of Open dialog.  NEdit file open dialogs are
  1160.         missing a text field at the bottom of the dialog, where the file
  1161.         name can be entered as a string.  The field is removed in NEdit to
  1162.         encourage users to type file names in the list, a non-standard, but
  1163.         much faster method for finding files.
  1164.  
  1165.     nedit.printCommand: (system specific) -- Command used by the print dialog
  1166.         to print a file, i.e. lp, lpr, etc..
  1167.  
  1168.     nedit.printCopiesOption: (system specific) -- Option name used to
  1169.         specify multiple copies to the print command.  If the option should
  1170.         be separated from its argument by a space, leave a trailing space.
  1171.         If blank, no "Number of Copies" item will appear in the print dialog.
  1172.  
  1173.     nedit.printQueueOption: (system specific) -- Option name used to specify
  1174.         a print queue to the print command.  If the option should be
  1175.         separated from its argument by a space, leave a trailing space. If
  1176.         blank, no "Queue" item will appear in the print dialog.
  1177.  
  1178.     nedit.printNameOption: (system specific) -- Option name used to specify a
  1179.         job name to the print command.  If the option should be separated
  1180.         from its argument by a space, leave a trailing space. If blank, no
  1181.         job or file name will be attached to the print job or banner page.
  1182.  
  1183.     nedit.printHostOption: (system specific) -- Option name used to specify a
  1184.         host name to the print command.  If the option should be separated
  1185.         from its argument by a space, leave a trailing space. If blank, no
  1186.         "Host" item will appear in the print dialog.
  1187.  
  1188.     nedit.printDefaultQueue: (system specific) -- The name of the default
  1189.         print queue.  Used only to display in the print dialog, and has no
  1190.         effect on printing.
  1191.  
  1192.     nedit.printDefaultHost: (system specific) -- The node name of the
  1193.         default print host.  Used only to display in the print dialog, and
  1194.         has no effect on printing.
  1195.  
  1196.     nedit.multiClickTime: (system specific) -- Maximum time in milliseconds
  1197.         allowed between mouse clicks within double and triple click actions.
  1198.  
  1199.     nedit*scrollBarPlacement: BOTTOM_LEFT -- How scroll bars are placed in
  1200.         NEdit windows, as well as various lists and text fields in the
  1201.         program.  Other choices are: BOTTOM_RIGHT, TOP_LEFT, or TOP_RIGHT.
  1202.  
  1203.     nedit*text.heavyCursor: False -- For monitors with poor resolution or
  1204.         users who have difficulty seeing the cursor, makes the cursor in the
  1205.         text editing area of the window heavier and darker.
  1206.  
  1207.     nedit*text.foreground: black -- Foreground color of the text editing area
  1208.         of the NEdit window.
  1209.  
  1210.     nedit*text.background: white -- Background color of the text editing area
  1211.         of the NEdit window.
  1212.  
  1213.     nedit*text.selectForeground: black -- Foreground (text) color for
  1214.         selections in the text editing area of the NEdit window. 
  1215.  
  1216.     nedit*text.selectBackground: gray80 -- Color for selections in the text
  1217.         editing area of the NEdit window.
  1218.  
  1219.     nedit*text.highlightForeground: white -- Foreground (text) color for
  1220.         highlights (parenthesis flashing) in the text editing area of the
  1221.         NEdit window.
  1222.  
  1223.     nedit*text.highlightBackground: red -- Color for highlights (parenthesis
  1224.         flashing) in the text editing area of the NEdit window.
  1225.  
  1226.     nedit*text.cursorForeground: black -- Color for text cursor in the text
  1227.         editing area of the NEdit window.
  1228.  
  1229.     nedit*text.blinkRate: 600 -- Blink rate of the text insertion cursor in
  1230.         milliseconds.  Set to zero to stop blinking.
  1231.  
  1232.     nedit*text.Translations: -- Modifies key bindings (see below).
  1233.  
  1234.     nedit*statsLine.foreground: black -- Foreground color of the statistics
  1235.         line area of the NEdit window.
  1236.  
  1237.     nedit*statsLine.background: gray70 -- Background color of the statistics
  1238.         line area of the NEdit window.
  1239.  
  1240.     nc.autoStart: False -- Whether the nc program should automatically start
  1241.         an NEdit server (without prompting the user) if an appropriate server
  1242.         is not found.
  1243.  
  1244.     nc.serverCommand: nedit -server -- Command used by the nc program to
  1245.         start an NEdit server.
  1246.  
  1247. Binding Keys to Actions
  1248.  
  1249. There are several ways to change key bindings in NEdit.  The easiest way to add
  1250. a new key binding in NEdit is to define a macro in the Macro Commands dialog in
  1251. the Default Settings sub-menu of the Preferences menu.  However, if you want to
  1252. change existing bindings or add a significant number of new key bindings you
  1253. will need to do so via X resources.  The methods for changing menu accelerator
  1254. keys is different from that for general key binding via translation tables. 
  1255. The section "Action Routines" lists the actions available to be bound.
  1256.  
  1257. Key Binding Via Translations 
  1258.  
  1259. The most general way to bind actions to keys in NEdit is to use the translation
  1260. table associated with the text widget.  To add a binding to Alt+Y to insert the
  1261. string "Hi!", for example, add lines similar to the following to your X
  1262. resource file:
  1263.  
  1264.   NEdit*text.Translations: #override \n\
  1265.     Alt<Key>y: insert-string("Hi!") \n
  1266.  
  1267. Unfortunately, the syntax for translation tables is not simple and is not
  1268. covered completely here.  You will need to refer to a book on the X window
  1269. system for the exact syntax for translation tables.  Translation tables map key
  1270. and mouse presses, window operations, and other kinds of events to actions. 
  1271. The syntax (somewhat oversimplified) is a keyword; #override, #augment, or
  1272. #replace; followed by lines (separated by newline characters) pairing events
  1273. with actions.  Events begin with modifiers, like Ctrl, Shift, or Alt, followed
  1274. by the event type in <>.  BtnDown, Btn1Down, Btn2Down, Btn1Up, Key, KeyUp are
  1275. valid event types.  For key presses, the event type is followed by the name of
  1276. the key.  You can specify a combination of events, such as a sequence of key
  1277. presses, by separating them with commas.  The other half of the event/action
  1278. pair is a set of actions.  These are separated from the event specification by
  1279. a colon and from each other by spaces.  Actions are names followed by
  1280. parentheses, optionally containing one or more parameters separated by comas.
  1281.  
  1282. Changing Menu Accelerator Keys
  1283.  
  1284. The menu shortcut keys shown at the right of NEdit menu items can also be
  1285. changed via X resources.  Each menu item has two resources associated with it,
  1286. accelerator, the event to trigger the menu item; and acceleratorText, the
  1287. string shown in the menu.  The form of the accelerator resource is the same as
  1288. events for translation table entries discussed above, though multiple keys and
  1289. other subtleties are not allowed.  The resource name for a menu is the title in
  1290. lower case, followed by "Menu", the resource name of menu item is the name in
  1291. lower case, run together, with words separated by caps, and all punctuation
  1292. removed.  For example, to change Cut to Ctrl+X, you would add the following to
  1293. your .Xdefaults file:
  1294.  
  1295.     nedit*editMenu.cut.accelerator: Ctrl<Key>x
  1296.     nedit*editMenu.cut.acceleratorText: Ctrl+X
  1297.  
  1298. Accelerator keys with optional shift key modifiers, like Find..., have an
  1299. additional accelerator resource with Shift appended to the name.  For example:
  1300.  
  1301.     nedit*searchMenu.find.acceleratorText: [Shift]Alt+F
  1302.     nedit*searchMenu.find.accelerator: Alt<Key>f
  1303.     nedit*searchMenu.findShift.accelerator: Shift Alt<Key>f
  1304.  
  1305.  
  1306. ACTION ROUTINES
  1307.  
  1308. All of the editing capabilities of NEdit are represented as a special type of
  1309. subroutine, called an action routine, which can be invoked from both macros and
  1310. translation table entries (see "Binding Keys to Actions" in the X Resources
  1311. section below).
  1312.  
  1313.  
  1314. Actions Representing Menu Commands:
  1315.  
  1316.     File Menu              Search Menu
  1317.     ---------------------     -----------------------
  1318.     new()              find()
  1319.     open()              find-dialog()
  1320.     open-dialog()          find-again()
  1321.     open-selected()          find-selection()
  1322.     close()              replace()
  1323.     save()              replace-dialog()
  1324.     save-as()              replace-all()
  1325.     save-as-dialog()          replace-in-selection()
  1326.     revert-to-saved()          replace-again()
  1327.     include-file()          goto-line-number()
  1328.     include-file-dialog ()    goto-line-number-dialog()
  1329.     load-tags-file()          goto-selected()
  1330.     load-tags-file-dialog()   mark()
  1331.     print()              mark-dialog()
  1332.     print-selection()          goto-mark()
  1333.     exit()              goto-mark-dialog()
  1334.                       match()
  1335.                       find-definition()
  1336.                       split-window()
  1337.     Edit Menu              close-pane()
  1338.     ---------------------
  1339.     undo()              Shell Menu
  1340.     redo()              -----------------------
  1341.     delete()              filter-selection-dialog()
  1342.     select-all()          filter-selection()
  1343.     shift-left()          execute-command()
  1344.     shift-left-by-tab()          execute-command-dialog()
  1345.     shift-right()          execute-command-line()
  1346.     shift-right-by-tab()      shell-menu-command()
  1347.     uppercase()
  1348.     lowercase()              Macro Menu
  1349.     fill-paragraph()          -----------------------
  1350.     control-code-dialog()     macro-menu-command()
  1351.  
  1352. The actions representing menu commands are named the same as the menu item with
  1353. punctuation removed, all lower case, and dashes replacing spaces.  Without the
  1354. -dialog suffix, commands which normally prompt the user for information,
  1355. instead take the information from the routine's arguments (see below).  To
  1356. present a dialog and ask the user for input, rather than supplying it in via
  1357. arguments, use the actions with the -dialog suffix.
  1358.  
  1359. Menu Action Routine Arguments:
  1360.  
  1361. Arguments are text strings enclosed in quotes.  Below are the menu action
  1362. routines which take arguments.  Optional arguments are inclosed in [].
  1363.  
  1364.   open(filename)
  1365.  
  1366.   save-as(filename)
  1367.  
  1368.   include(filename)
  1369.  
  1370.   load-tags-file(filename)
  1371.  
  1372.   find-dialog([search-direction])
  1373.  
  1374.   find(search-string [, search-direction], [search-type])
  1375.  
  1376.   find-again([search-direction])
  1377.  
  1378.   find-selection([search-direction])
  1379.  
  1380.   replace-dialog([search-direction])
  1381.  
  1382.   replace(search-string, replace-string, [, search-direction] [, search-type])
  1383.  
  1384.   replace-in-selection(search-string, replace-string [, search-type])
  1385.  
  1386.   replace-again([search-direction])
  1387.  
  1388.   goto-line-number([line-number])
  1389.  
  1390.   mark(mark-letter)
  1391.  
  1392.   goto-mark(mark-letter)
  1393.  
  1394.   filter-selection(shell-command)
  1395.  
  1396.   execute-command(shell-command)
  1397.  
  1398.   shell-menu-command(shell-menu-item-name)
  1399.  
  1400.   macro-menu-command(macro-menu-item-name)
  1401.  
  1402. Some notes on argument types above:
  1403.  
  1404.   filename        Path names are interpreted relative to the directory
  1405.              from which NEdit was started, wildcards and ~ are not
  1406.              expanded.
  1407.              
  1408.   search-direction  Either "forward" or "backward"
  1409.  
  1410.   search-type        Either "literal", "case", or "regex"
  1411.  
  1412.   mark-letter        The mark command limits users to single letters.
  1413.              Inside of macros, numeric marks are allowed, which
  1414.              won't interfere with marks set by the user.
  1415.  
  1416.   (macro or shell)  Name of the command exactly as specified in the Macro
  1417.   -menu-item-name   Commands or Shell Commands dialogs
  1418.  
  1419. Keyboard-Only Actions
  1420.  
  1421. backward-character()
  1422. Moves the cursor one character to the left.
  1423.  
  1424. backward-paragraph()
  1425. Moves the cursor to the beginning of the paragraph, or if the cursor is already
  1426. at the beginning of a paragraph, moves the cursor to the beginning of the
  1427. previous paragraph.  Paragraphs are defined as regions of text delimited by one
  1428. or more blank lines.
  1429.  
  1430. backward-word()
  1431. Moves the cursor to the beginning of a word, or, if the cursor is already at
  1432. the beginning of a word, moves the cursor to the beginning of the previous
  1433. word.  Word delimiters are user-settable, and defined by the X resource
  1434. wordDelimiters.
  1435.  
  1436. beginning-of-file()
  1437. Moves the cursor to the beginning of the file.
  1438.  
  1439. beginning-of-line()
  1440. Moves the cursor to the beginning of the line.
  1441.  
  1442. beginning-of-selection()
  1443. Moves the cursor to the beginning of the selection without disturbing the
  1444. selection.
  1445.  
  1446. copy-clipboard()
  1447. Copies the current selection to the clipboard.
  1448.  
  1449. copy-primary()
  1450. Copies the primary selection to the cursor.
  1451.  
  1452. copy-to()
  1453. If a secondary selection exists, copies the secondary selection to the cursor. 
  1454. If no secondary selection exists, copies the primary selection to the pointer
  1455. location.
  1456.  
  1457. copy-to-or-end-drag()
  1458. Completes either a secondary selection operation, or a primary drag.  If the
  1459. user is dragging the mouse to adjust a secondary selection, the selection is
  1460. copied and either inserted at the cursor location, or, if pending-delete is on
  1461. and a primary selection exists in the window, replaces the primary selection. 
  1462. If the user is dragging a block of text (primary selection), completes the drag
  1463. operation and leaves the text at it's current location.
  1464.  
  1465. cut-clipboard()
  1466. Deletes the text in the primary selection and places it in the clipboard.
  1467.  
  1468. cut-primary()
  1469. Copies the primary selection to the cursor and deletes it at its original
  1470. location.
  1471.  
  1472. delete-selection()
  1473. Deletes the contents of the primary selection.
  1474.  
  1475. delete-next-character()
  1476. If a primary selection exists, deletes its contents.  Otherwise, deletes the
  1477. character following the cursor.
  1478.  
  1479. delete-previous-character()
  1480. If a primary selection exists, deletes its contents.  Otherwise, deletes the
  1481. character before the cursor.
  1482.  
  1483. delete-next-word()
  1484. If a primary selection exists, deletes its contents.  Otherwise, deletes the
  1485. word following the cursor.
  1486.  
  1487. delete-previous-word()
  1488. If a primary selection exists, deletes its contents.  Otherwise, deletes the
  1489. word before the cursor.
  1490.  
  1491. delete-to-start-of-line()
  1492. If a primary selection exists, deletes its contents.  Otherwise, deletes the
  1493. characters between the cursor and the start of the line.
  1494.  
  1495. delete-to-end-of-line()
  1496. If a primary selection exists, deletes its contents.  Otherwise, deletes the
  1497. characters between the cursor and the end of the line.
  1498.  
  1499. deselect-all()
  1500. De-selects the current selection.
  1501.  
  1502. end-of-file()
  1503. Moves the cursor to the end of the file.
  1504.  
  1505. end-of-line()
  1506. Moves the cursor to the end of the line.
  1507.  
  1508. end-of-selection()
  1509. Moves the cursor to the end of the selection without disturbing the selection.
  1510.  
  1511. exchange()
  1512. Exchange the primary and secondary selections.
  1513.  
  1514. extend-adjust()
  1515. Attached mouse-movement events to begin a selection between the cursor and the
  1516. mouse, or extend the primary selection to the mouse position.
  1517.  
  1518. extend-end()
  1519. Completes a primary drag-selection operation.
  1520.  
  1521. extend-start()
  1522. Begins a selection between the cursor and the mouse.  A drag-selection
  1523. operation can be started with either extend-start or grab-focus.
  1524.  
  1525. forward-character()
  1526. Moves the cursor one character to the right.
  1527.  
  1528. forward-paragraph()
  1529. Moves the cursor to the beginning of the next paragraph.  Paragraphs are
  1530. defined as regions of text delimited by one or more blank lines.
  1531.  
  1532. forward-word()
  1533. Moves the cursor to the beginning of the next word.  Word delimiters are
  1534. user-settable, and defined by the X resource wordDelimiters.
  1535.  
  1536. grab-focus()
  1537. Moves the cursor to the mouse pointer location, and prepares for a possible
  1538. drag-selection operation (bound to extend-adjust), or multi-click operation (a
  1539. further grab-focus action).  If a second invocation of grab focus follows
  1540. immediately, it selects a whole word, or a third, a whole line.
  1541.  
  1542. insert-string("string")
  1543. If pending delete is on and the cursor is inside the selection, replaces the
  1544. selection with "string".  Otherwise, inserts "string" at the cursor location.
  1545.  
  1546. key-select("direction")
  1547. Moves the cursor one character in "direction" ("left", "right", "up", or "down")
  1548. and extends the selection.  Same as: forward/backward-character("extend"), or
  1549. process-up/down("extend"), for compatibility with previous versions.
  1550.  
  1551. move-destination()
  1552. Moves the cursor to the pointer location without disturbing the selection. 
  1553. (This is an unusual way of working.  We left it in for compatibility with
  1554. previous versions, but if you actually use this capability, please send us some
  1555. mail, otherwise it is likely to disappear in the future.
  1556.  
  1557. move-to()
  1558. If a secondary selection exists, deletes the contents of the secondary
  1559. selection and inserts it at the cursor, or if pending-delete is on and there is
  1560. a primary selection, replaces the primary selection.  If no secondary selection
  1561. exists, moves the primary selection to the pointer location, deleting it from
  1562. its original position.
  1563.  
  1564. move-to-or-end-drag()
  1565. Completes either a secondary selection operation, or a primary drag.  If the
  1566. user is dragging the mouse to adjust a secondary selection, the selection is
  1567. deleted and either inserted at the cursor location, or, if pending-delete is on
  1568. and a primary selection exists in the window, replaces the primary selection. 
  1569. If the user is dragging a block of text (primary selection), completes the drag
  1570. operation and deletes the text from it's current location.
  1571.  
  1572. newline()
  1573. Inserts a newline character.  If Auto Indent is on, lines up the indentation of
  1574. the cursor with the current line.
  1575.  
  1576. newline-and-indent()
  1577. Inserts a newline character and lines up the indentation of the cursor with the
  1578. current line, regardless of the setting of Auto Indent.
  1579.  
  1580. newline-no-indent()
  1581. Inserts a newline character, without automatic indentation, regardless of the
  1582. setting of Auto Indent.
  1583.  
  1584. next-page()
  1585. Moves the cursor and scroll forward one page.
  1586.  
  1587. page-left()
  1588. Move the cursor and scroll left one page.
  1589.  
  1590. page-right()
  1591. Move the cursor and scroll right one page.
  1592.  
  1593. paste-clipboard()
  1594. Insert the contents of the clipboard at the cursor, or if pending delete is on,
  1595. replace the primary selection with the contents of the clipboard.
  1596.  
  1597. previous-page()
  1598. Moves the cursor and scroll backward one page.
  1599.  
  1600. process-bdrag()
  1601. Same as secondary-or-drag-start for compatibility with previous versions.
  1602.  
  1603. process-cancel()
  1604. Cancels the current extend-adjust, secondary-adjust, or
  1605. secondary-or-drag-adjust in progress.
  1606.  
  1607. process-down()
  1608. Moves the cursor down one line.
  1609.  
  1610. process-return()
  1611. Same as newline for compatibility with previous versions.
  1612.  
  1613. process-shift-down()
  1614. Same as process-down("extend") for compatibility with previous versions.
  1615.  
  1616. process-shift-up()
  1617. Same as process-up("extend") for compatibility with previous versions.
  1618.  
  1619. process-tab()
  1620. If tab emulation is turned on, inserts an emulated tab, otherwise inserts a tab
  1621. character.
  1622.  
  1623. process-up()
  1624. Moves the cursor up one line.
  1625.  
  1626. secondary-adjust()
  1627. Attached mouse-movement events to extend the secondary selection to the mouse
  1628. position.
  1629.  
  1630. secondary-or-drag-adjust()
  1631. Attached mouse-movement events to extend the secondary selection, or reposition
  1632. the primary text being dragged.  Takes two optional arguments, "copy", and
  1633. "overlay".  "copy" leaves a copy of the dragged text at the site at which the
  1634. drag began.  "overlay" does the drag in overlay mode, meaning the dragged text
  1635. is laid on top of the existing text, obscuring and ultimately deleteing it when
  1636. the drag is complete.
  1637.  
  1638. secondary-or-drag-start()
  1639. To be attached to a mouse down event.  Begins drag selecting a secondary
  1640. selection, or dragging the contents of the primary selection, depending on
  1641. whether the mouse is pressed inside of an existing primary selection.
  1642.  
  1643. secondary-start()
  1644. To be attached to a mouse down event.  Begin drag selecting a secondary
  1645. selection.
  1646.  
  1647. select-all()
  1648. Select the entire file.
  1649.  
  1650. self-insert()
  1651. To be attached to a key-press event, inserts the character equivalent of the
  1652. key pressed.
  1653.  
  1654. Arguments to Keyboard Action Routines 
  1655.  
  1656. In addition to the arguments listed in the call descriptions, any routine
  1657. involving cursor movement can take the argument "extend", meaning, adjust the
  1658. primary selection to the new cursor position.  Routines which take the "extend"
  1659. argument as well as mouse dragging operations for both primary and secondary
  1660. selections can take the optional keyword "rect", meaning, make the selection
  1661. rectangular.
  1662.  
  1663.  
  1664. SOLUTIONS TO COMMON PROBLEMS
  1665.  
  1666. P: No files are shown in the "Files" list in the Open... dialog.
  1667. S: When you use the "Filter" field, include the file specification or a
  1668.    complete directory specification, including the trailing "/" on Unix.  (See
  1669.    Help in the Open... dialog).
  1670.  
  1671. P: Keyboard shortcuts for menu items don't work.
  1672. S: Be sure the Caps Lock and Num Lock keys are both unlocked.  In Motif
  1673.    programs, these keys prevent the menu accelerators from working.
  1674.  
  1675. P: Find Again and Replace Again don't continue in the same direction as the
  1676.    original Find or Replace.
  1677. S: Find Again and Replace Again don't use the direction of the original search. 
  1678.    The Shift key controls the direction: Ctrl+G means forward, Shift+Ctrl+G
  1679.    means backward.
  1680.  
  1681. P: Preferences specified in the Preferences menu don't seem to get saved when I
  1682.    select Save Defaults.
  1683. S: NEdit has two kinds of preferences: 1) per-window preferences, in the
  1684.    Preferences menu, and 2) default settings for preferences in newly created
  1685.    windows, in the Default Settings sub-menu of the Preferences menu.  Per-
  1686.    window preferences are not saved by Save Defaults, only Default Settings.
  1687.  
  1688. P: Columns and indentation don't line up.
  1689. S: NEdit is using a proportional width font.  Set the font to a fixed style
  1690.    (see Preferences).
  1691.  
  1692. P: NEdit performs poorly on very large files.
  1693. S: Turn off Incremental Backup.  With Incremental Backup on, NEdit periodically
  1694.    writes a full copy of the file to disk.
  1695.  
  1696. P: Commands added to the Shell Commands menu (Unix only) don't output anything
  1697.    until they are finished executing.
  1698. S: If the command output is directed to a dialog, or the input is from a
  1699.    selection, output is collected together and held until the command
  1700.    completes.  De-select both of the options and the output will be shown
  1701.    incrementally as the command executes.
  1702.  
  1703. P: Dialogs don't automatically get keyboard focus when they pop up.
  1704. S: Most X Window managers allow you to choose between two categories of
  1705.    keyboard focus models: pointer focus, and explicit focus.  Pointer focus
  1706.    means that as you move the mouse around the screen, the window under the
  1707.    mouse automatically gets the keyboard focus.  NEdit users who use this focus
  1708.    model should set "Popups Under Pointer" in the Default Settings sub menu of
  1709.    the preferences menu in NEdit.  Users with the explicit focus model, in some
  1710.    cases, may have problems with certain dialogs, such as Find and Replace.  In
  1711.    MWM this is caused by the mwm resource startupKeyFocus being set to False
  1712.    (generally a bad choice for explicit focus users).  NCDwm users should use
  1713.    the focus model "click" instead of "explicit", again, unless you have set it
  1714.    that way to correct specific problems, this is the appropriate setting for
  1715.    most explicit focus users.
  1716.  
  1717.  
  1718. KNOWN BUGS
  1719.  
  1720. Below is the list of known bugs which affect NEdit.  The bugs your copy of
  1721. NEdit will exhibit depend on which system you are running and with which Motif
  1722. libraries it was built. Note that there are now Motif 1.2 / X11R5 libraries
  1723. available on ALL supported platforms, and as you can see below there are far
  1724. fewer bugs in Motif 1.2, so it is in your best interest to upgrade your system.
  1725.  
  1726. All Versions
  1727.  
  1728. BUG: Operations between rectangular selections on overlapping lines do nothing.
  1729. WORKAROUND: None.  These operations are very complicated and rarely used, maybe
  1730.      next version.
  1731.  
  1732. BUG: Cut and Paste menu items fail, or possibly crash, for very large
  1733.      (multi-megabyte) selections.
  1734. WORKAROUND: Use selection copy (middle mouse button click) for transferring
  1735.      larger quantities of data.  Cut and Paste save the copied text in server
  1736.      memory, which is usually limited.
  1737.  
  1738. Motif 1.1 Versions
  1739.  
  1740. BUG: The shortcut method for entering control characters (Alt+Ctrl+char) is not
  1741.      available.
  1742. WORKAROUND: Use the Ins. Control Char command.
  1743.  
  1744. BUG: Pop-up dialogs "jump" (appear briefly in a different location) when they
  1745.      are first invoked.
  1746. WORKAROUND: Turn off "Popups Under Pointer" if this gives you a headache.
  1747.  
  1748. VMS Versions
  1749.  
  1750. BUGS: 1. Abbreviation of command line qualifiers is not allowed.
  1751.       2. Error messages for mistakes on the command line don't make sense.
  1752. WORKAROUND: NEdit does not parse its command line with the standard DCL command
  1753.       parser, instead, it superficially converts the command line to a
  1754.       Unix-style command line before processing it.  Because information is
  1755.       lost, NEdit may not always be able to distinguish between items that are
  1756.       supposed to be qualifiers and those which are supposed to be files and
  1757.       arguments to the qualifiers.  However, correct VMS command lines are
  1758.       always processed correctly, and only certain types of errors will appear
  1759.       to give strange results.
  1760.  
  1761. BUG: Protection settings for new versions of files produced by NEdit over
  1762.      DECNET connections may revert to defaults.
  1763. WORKAROUND: Check and reset protections when accessing files via DECNET.
  1764.  
  1765. IBM Versions built with Motif 1.1
  1766.  
  1767. BUG: The Command to set the font for the current window is not available.
  1768. WORKAROUND: Use the Default Settings sub-menu to set the default font and then
  1769.      create a new window.
  1770.  
  1771. BUG: NEdit can occasionally crash on window closing.
  1772. WORKAROUND: Save files frequently, see Crash Recovery.
  1773.  
  1774.  
  1775. MAILING LIST
  1776.  
  1777. There are now two separate mailing lists for NEdit users. nedit_discuss, as the
  1778. name implies, is for open discussion among NEdit users.  nedit_announces
  1779. intended to be a very low volume mailing list for announcement of new versions,
  1780. new executables, and significant contributed software.
  1781.  
  1782. To subscribe to nedit_discuss, send a message containing the following line in
  1783. the body of the message (not the subject) to mailserv@fnal.gov:
  1784.  
  1785.     subscribe nedit_discuss
  1786.  
  1787. To subscribe to nedit_announce, send a separate message to mailserv@fnal.gov
  1788. containing the line:
  1789.  
  1790.     subscribe nedit_announce
  1791.  
  1792. To unsubscribe, send:
  1793.  
  1794.     unsubscribe nedit_discuss (or nedit_announce)
  1795.  
  1796. After subscribing, you will receive copies of all of the email submitted to the
  1797. list.  You may submit mail to the discussion list by sending it to:
  1798.  
  1799.     nedit_discuss@fnal.gov
  1800.  
  1801. Users are allowed to post to nedit_announce as well (just make sure that the
  1802. content is appropriate).
  1803.  
  1804.  
  1805. DISTRIBUTION POLICY
  1806.  
  1807. FermiTools Software Legal Information - November 1, 1996
  1808.  
  1809. COPYRIGHT STATUS:  Fermi National Accelerator Laboratory (FNAL) documents are
  1810. sponsored by the U.S. Department of Energy under Contract No.
  1811. DE-AC02-76CH03000.  Therefore, the U.S. Government retains a non-exclusive,
  1812. royalty-free license to publish or reproduce these documents or software for
  1813. U.S. Government purposes.  All documents and software available from this
  1814. server are protected under the U.S. and Foreign Copyright Laws, and FNAL
  1815. reserves all rights.
  1816.  
  1817. Terms and Conditions
  1818.  
  1819. When a User distributes or otherwise obtains a software package included in
  1820. the Fermilab Software Tools Program, the user agrees to abide by the Terms and
  1821. Conditions of the Program below:
  1822.  
  1823.    o Any redistribution of the software shall be accompanied by this
  1824.      INFORMATION/LICENSE AGREEMENT and the product's ORIGIN STATEMENT (below).
  1825.  
  1826.    o The User shall acknowledge the origin of the software as set forth 
  1827.      below:
  1828.  
  1829.         "This work was performed at Fermi National Accelerator Laboratory, 
  1830.          operated by Universities Research Association, Inc., under contract 
  1831.          DE-AC02-76CH03000 with the U.S. Department of Energy."
  1832.  
  1833.    o The user is asked to feed back problems, benefits, and/or suggestions 
  1834.      about the software to the Fermilab Software Providers and/or FermiTools 
  1835.      management.
  1836.  
  1837.    o Any distribution of the software available from this server shall be  at
  1838.      no charge.  To obtain a license to commercialize any of the software
  1839.      programs available from Fermilab including this software, contact FNAL's
  1840.      Office of Research and Technology Applications, P.O. Box 500, MS-200,
  1841.      Batavia, IL 60510-0500.
  1842.  
  1843. Indemnification by User of Third Party Claims and Disclosure of Liability
  1844.  
  1845. The User, his/her directors, officers, employees, and agents hereby release
  1846. and waive all claims against Universities Research Association, Inc. (URA)
  1847. operator of Fermi National Accelerator Laboratory, its trustees, overseers,
  1848. directors, officers, employees, agents, subcontractors, successors and
  1849. assigns, for any and all liability and damages arising from the reproduction,
  1850. use or other disposition of the software.  The User shall indemnify URA and
  1851. the U.S. Government for all damages, costs or expenses, including attorney's
  1852. fees, arising from the utilization of the software, including, but not limited
  1853. to, the making, using, selling or exporting of products, processes or services
  1854. derived from the Software.  The User agrees to indemnify, hold harmless and
  1855. defend URA, its trustees, overseers, directors, officers, employees, agents,
  1856. subcontractors, successors and assigns, against any and all liability, damage,
  1857. loss, cost, charge, claim, demand, fee or expense of every nature and kind
  1858. which may at any time hereafter, be sustained by URA by reason of claims of
  1859. third parties arising out of alleged acts or omissions of the User in the
  1860. reproduction, use or other disposition of the Software.  
  1861.  
  1862. The User agrees that URA, its trustees, overseers, directors, officers,
  1863. employees, agents, subcontractors, successors and assigns shall not be liable
  1864. under any claim, charge, or demand, whether in contract, tort, criminal law,
  1865. or otherwise, for any and all loss, cost, charge, claim, demand, fee, expense,
  1866. or damage of every nature and kind arising out of, connected with, resulting
  1867. from or sustained as a result of the use of the software programs available
  1868. from this server.  In no event shall URA be liable for special, direct,
  1869. indirect or consequential damages, losses, costs, charges, claims, demands,
  1870. fees or expenses of any nature or kind.
  1871.  
  1872. Disclaimer of Warranties
  1873.  
  1874. The software is provided on an "as is" basis only.  URA makes no
  1875. representations, express or implied.  URA makes no representations or
  1876. warranties of merchantability or fitness for any particular purpose, or
  1877. assumes any legal liability or responsibility for the accuracy, completeness,
  1878. or usefulness of any information, apparatus, product or process disclosed, or
  1879. represents that the Software will not infringe any privately held patent,
  1880. copyright, or trademark.  The entire risk as to the results and the
  1881. performance of this software is assumed by the User.
  1882.  
  1883. Disclaimer of Endorsement
  1884.  
  1885. Reference herein to any specific commercial products, process, or service by
  1886. tradename, trademark, manufacturer or otherwise, does not constitute or imply
  1887. its endorsement, recommendation, or favoring by the United States Government,
  1888. U.S. Department of Energy or URA.  The views and opinions of individuals
  1889. expressed herein do not necessarily state or reflect those of the United
  1890. States Government, U.S. Department of Energy or URA and shall not be used for
  1891. advertising or product endorsement purposes.
  1892.  
  1893. Liabilities of the Government
  1894.  
  1895. This software is provided by URA, independent from its Prime Contract with the
  1896. U.S. Department of Energy.  URA is acting independently from the Government
  1897. and in its own private capacity and is not acting on behalf of the U.S.
  1898. Government, nor as its contractor nor its agent.  Correspondingly, it is
  1899. understood and agreed that the U.S. Government has no connection to this
  1900. software and in no manner whatsoever shall be liable for nor assume any
  1901. responsibility or obligation for any claim, cost, or damages arising out of or
  1902. resulting from the use of the software available from this server.
  1903.  
  1904. ORIGIN STATEMENT
  1905.  
  1906. Authors
  1907.  
  1908. Mark Edel, Joy Kyriakopulos, Arnulfo Zepeda-Navratil, Suresh Ravoor, Donna Reid,
  1909. Jeff Kallenbach
  1910.  
  1911. Fermi National Accelerator Laboratory
  1912. MS 234
  1913. P.O.Box 500
  1914. Batavia, IL 60510
  1915.  
  1916. Acknowledgement:
  1917.  
  1918. Regular expression code by Henry Spencer
  1919.  
  1920. Nedit incorporates an altered version of Henry Spencer's regcomp and regexec
  1921. code adapted for NEdit. Original copyright notice:
  1922.  
  1923. Copyright (c) 1986 by University of Toronto. Written by Henry Spencer.  Not
  1924. derived from licensed software.
  1925.  
  1926. Permission is granted to anyone to use this software for any purpose on any
  1927. computer system, and to redistribute it freely, subject to the following
  1928. restrictions:
  1929.  
  1930. 1. The author is not responsible for the consequences of use of this software,
  1931. no matter how awful, even if they arise from defects in it.
  1932.  
  1933. 2. The origin of this software must not be misrepresented, either by explicit
  1934. claim or by omission.
  1935.  
  1936. 3. Altered versions must be plainly marked as such, and must not be
  1937. misrepresented as being the original software.
  1938.  
  1939. End of INFORMATION/LICENSE AGREEMENT FOR NEDIT.
  1940.